package com.example.traning.mall.dal.mysql.account;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.traning.mall.dal.dataobject.account.AccountUserRole;
import com.example.traning.mall.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 用户角色关联 Mapper 接口
 * </p>
 *
 * @author Lei Yu
 * @since 2025-04-29
 */
@Mapper
public interface AccountUserRoleMapper extends BaseMapperX<AccountUserRole> {

    default void deleteByUserId(Long userId) {
        delete(new LambdaQueryWrapper<AccountUserRole>().eq(AccountUserRole::getUserId, userId));
    }

}
